﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<SG.Logic.DTOCurvaABC>>" %>

<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>

<asp:Content ID="Content5" ContentPlaceHolderID="Head" runat="server">
    <link rel="stylesheet" type="text/css" href="<%=Url.Content("~/Scripts/dhtmlx/dhtmlxChart/codebase/dhtmlxchart.css") %>"/>
    <script type="text/javascript" src="<%=Url.Content("~/Scripts/dhtmlx/dhtmlxChart/codebase/dhtmlxchart.js") %>" ></script>

</asp:Content>



<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Curva ABC
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="TitlePage" runat="server">
    Curva ABC
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <form id="form1" runat="server">

    <table class="table">
        <tr>
            <th>
                Código Articulo
            </th>
            <th>
                Nombre
            </th>   
            <th>
                Costo Unitario
            </th>         
            <th>
                Demanda Anual
            </th>
            <th>
                DAV
            </th>
            <th>
                DAV Acumulada
            </th>
            <th>
                % CAP
            </th>
            <th>
                % Item
            </th>
            <th>
                Clase
            </th>
        </tr>
                
        <% foreach (var item in Model) { %>                  
       
        <tr>
        
            <td>
                <%: item.NumeroArticulo %>
            </td>
            <td>
                <%: item.Nombre %>
            </td>
            
            <td>
                <%: item.CostoUnitario%>
            </td>
            <td>
                <%: item.DemandaAnual %>
            </td>
            <td>
                <%: item.DAV%>
            </td>
            <td>
                <%: item.DAVAcumulada %>
            </td>
            <td>
                <%: item.PorcentajeCAP%>
            </td> 
            <td>
                <%: item.PorcentajeItem%>
            </td> 
            <td>
                <%: item.Clase%>
            </td>  
        </tr>
         
    <% } %>



    </table>

    <%--<p>
        <%: Html.ActionLink("Graficar", "Create") %>
    </p>
    <script type="text/javascript">
        var data = [{ sales: "3.0", year: "2000" }, { sales: "3.8", year: "2001" }, { sales: "3.4", year: "2002" }, { sales: "4.1", year: "2003"}];
        window.onload = doOnLoad
        function doOnLoad() {
            //  var chart1 = new dhtmlXChart({view: "area",container: "chart1",value: "#sales#",color: "#00ccff",padding:{ {left: 30},yAxis: {start: 0,step: 1,end: 10;},xAxis: {lines: true,title: "sales per year",template: "#year#";}});
            var chart1 = new dhtmlxChart({ view: "area", container: "chart_container", value: "#sales#", label: "#year#" });
            chart1.parse(data, "jsarray");
        }
    </script>--%>
     


    
    </form>


    
</asp:Content>





